The propensity for visiting urban parks is affected by the park’s attractiveness and travel convenience, where walking provides the most basic and fair access. Walking routes from residences to parks, in terms of duration and perception, have received insufficient attention in the literature. Using the case study of Xuanwu Lake Park in China, I acquired walking routes from residences to the park through open-source data scraping in order to depict the pedestrian shed and pedestrian environment reasonably along these routes.
Import packages
library(sf)
library(tidyverse)
library(tmap)
library(leaflet)
library(kableExtra)
# knitr::opts_chunk$set(cache=TRUE) # cache the results for quick compiling
Upload walking route data
walkroutes <- read_csv("data/Walking routes.csv")
walkroutes_ta <- subset(walkroutes, select=-c(geometry))
kable(head(walkroutes_ta), align = "c") %>%
kable_styling(bootstrap_options = "bordered", full_width = F)
| ori_lng_84 | ori_lat_84 | des_lng_84 | des_lat_84 | route_dis | euclidean_dis | turn | cross road |
|---|---|---|---|---|---|---|---|
| 118.8080 | 32.07188 | 118.8095 | 32.07601 | 719 | 480.46647 | 3 | 0 |
| 118.7973 | 32.08334 | 118.7982 | 32.08437 | 680 | 142.53111 | 5 | 1 |
| 118.7973 | 32.08334 | 118.7978 | 32.08516 | 565 | 206.74718 | 4 | 1 |
| 118.7973 | 32.08334 | 118.7978 | 32.08394 | 526 | 80.54326 | 4 | 1 |
| 118.7973 | 32.08334 | 118.7971 | 32.08452 | 459 | 133.26186 | 6 | 1 |
| 118.7973 | 32.08334 | 118.7978 | 32.08378 | 523 | 63.54885 | 4 | 1 |
According to the policy of the 15-Minute Community-Life Circle, a 15-min walk to parks is important for residents in China, which corresponds to about a 1000-m distance. I called the travel navigation function of online map to scrape recommended walking routes from residential buildings to the entrances of Xuanwu Lake Park, with a 15-min duration as the threshold. This data also includes the information of route distance, euclidean distance, the number of turns, the number of crossings, starting, and ending points.
Process and spatialize data
walkroutes_sf <- st_as_sf(walkroutes, wkt = "geometry", crs=4326)
ori_points <- st_as_sf(walkroutes_ta, coords = c("ori_lng_84","ori_lat_84"), crs=4326)
des_points <- st_as_sf(walkroutes_ta, coords = c("des_lng_84","des_lat_84"), crs=4326)
boundary <- read_sf("data/Park Boundary.shp")
boundary_li = st_cast(boundary, "LINESTRING")
Show whole data set
current.mode <- tmap_mode("view")
bound_box <- c(left = 118.7772332, bottom = 32.0550625, right = 118.8104844, top = 32.0902245)
map_1 <- tm_basemap(leaflet::providers$Esri.WorldTopoMap, alpha = 0.4) +
tm_shape(boundary_li, bbox = bound_box) +
tm_lines(scale = 4, col = "red") +
tm_shape(walkroutes_sf) +
tm_lines(scale = 0.5, col = "blue") +
tm_shape(ori_points) +
tm_symbols(size = 0.1, col = "goldenrod1") +
tm_shape(des_points) +
tm_symbols(size = 0.06, col = "chartreuse", border.alpha = 0)
map_1
A reasonable walking distance is necessary for daily park users. There are many measurement to define pedestrian shed.
Euclidean distance buffer method and service areas
boundary_li_pro <- st_transform(boundary_li, "EPSG:32650")
boundary_pro <- st_transform(boundary, "EPSG:32650")
boundary_bu <- st_buffer(boundary_li_pro, 1000)
boundary_di <- st_difference(boundary_bu, boundary_pro)
area_ED <- st_area(boundary_di)
background_bu <- read_sf("data/Background buildings.shp")
background_ro <- read_sf("data/Background routes.shp")
current.mode <- tmap_mode("plot")
boundary_di_bu <- st_buffer(boundary_di, 500)
map_2 <- tm_shape(background_bu, bbox = boundary_di_bu) +
tm_polygons(col = "azure2", border.alpha = 0) +
tm_shape(background_ro) +
tm_lines(scale = 0.5, col = "azure2") +
tm_shape(boundary_di) +
tm_polygons(scale = 4, col = "deepskyblue3", alpha = 0.5, border.alpha = 0) +
tm_shape(boundary_li) +
tm_lines(scale = 4, col = "red") +
tm_credits(paste("Service areas with Euclidean distance buffer method is",as.character(round(area_ED/1000000)),"km2"), position=c("left", "bottom"))
map_2
line-based network 50m-buffer method and service areas
walkroutes_pro <- st_transform(walkroutes_sf, "EPSG:32650")
walkroutes_pro_un <- st_union(walkroutes_pro)
walkroutes_bu <- st_buffer(walkroutes_pro_un, 50)
walkroutes_di <- st_difference(walkroutes_bu, boundary_pro)
area_RD <- st_area(walkroutes_di)
current.mode <- tmap_mode("plot")
map_3 <- tm_shape(background_bu, bbox = boundary_di_bu) +
tm_polygons(col = "azure2", border.alpha = 0) +
tm_shape(background_ro) +
tm_lines(scale = 0.5, col = "azure2") +
tm_shape(walkroutes_di) +
tm_polygons(scale = 4, col = "deepskyblue3", alpha = 0.5, border.alpha = 0) +
tm_shape(boundary_li) +
tm_lines(scale = 4, col = "red") +
tm_credits(paste("Service areas with line-based network 50m-buffer method is",as.character(round(area_RD/1000000)),"km2"), position=c("left", "bottom"))
map_3

This image proposed a line-based network buffer method that defined areas near the center line of routes as accessible, which is more accurate, as it is closer to the actual environment available to pedestrians. As you can see in Map2 and Map3, the service areas determined by the route-based method were significantly less than those by Euclidean distance buffer method, which the ratio is 0.31.